#ifndef GAMETOOLBOX_MATHS_VECTOR3_H
#define GAMETOOLBOX_MATHS_VECTOR3_H

template< class t>
class Vector3
{
public:
	Vector3< t >()				: m_X( 0 ), m_Y( 0 ), m_Z( 0 ) { }
	Vector3< t >( t x, t y, t z )	: m_X( x ), m_Y( y ), m_Z( z ) { }

	void add( const Vector3& vec );

	static Vector3 add( Vector3< t > vec1, Vector3< t > vec2 );
	static Vector3 backward()	{ return Vector3< t >( 0, 0, 1 ); }
	static Vector3 down()		{ return Vector3< t >( 0, -1, 0 ); }
	static Vector3 forward()	{ return Vector3< t >( 0, 0, -1 ); }
	static Vector3 left()		{ return Vector3< t >( -1, 0, 0 ); }
	static Vector3 right()		{ return Vector3< t >( 1, 0, 0 ); }
	static Vector3 up()			{ return Vector3< t >( 0, 1, 0 ); }

	static Vector3 one()		{ return Vector3< t >( 1, 1, 1 ); }
	static Vector3 zero()		{ return Vector3< t >( 0, 0, 0 ); }

	static Vector3 unitX()		{ return Vector3< t >( 1, 0, 0 ); }
	static Vector3 unitY()		{ return Vector3< t >( 0, 1, 0 ); }
	static Vector3 unitZ()		{ return Vector3< t >( 0, 0, 1 ); }
	
	

private:
	union 
	{
		t v[3];
		struct { t m_X, m_Y , m_Z; };
	};
};

#endif //GAMETOOLBOX_MATHS_VECTOR3_H
